package com.pinc.exam;

import java.util.ArrayList;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public abstract class MyBaseAdapter<E> extends BaseAdapter {

	protected ArrayList<E> items;
	protected LayoutInflater inflater;
	protected Context mcontext;

	public MyBaseAdapter(Context context) {
		inflater = LayoutInflater.from(context);
		mcontext = context;
	}

	public void add(E cc)
	{
		items.add(cc);
	}

	public void clearAll()
	{
		items.removeAll(items);
	}

	@Override
	public int getCount() {
		return items.size();
	}

	@Override
	public Object getItem(int position) {
		return null;
	}

	@Override
	public long getItemId(int position) {
		return ((Base_Class)(items.get(position))).id;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		return null;
	}

}
